if 5>12:
    print("5 is not greater than 12")
    print("2222")
else:
    print("5 is not greater than 12")


age=30
if age <18:
    print("You are underaged")
elif age >=19 and age <30:
    print("YOU are young")
elif age >=30 and age <50:
    print("YOU are middle-aged")
else:
    print("YOU are old")


#判断闰年
year=int(input("请输入年份"))
if (year %4==0and year %100 !=0)or (year %400==0):
    print("%d是闰年"%year)#%d占位
else:
    print("%d不是闰年"%year)

#嵌套
a=int(input("请输入a"))
b=int(input("请输入b"))
c=int(input("请输入c"))
if a>b:
    if a>c:
        print("a is largest")
    else:
        print("c is largest")
else:
    if b>c:
        print("b is largest")
    else:
        if b<c:
            print("c is largest")



#计算器
num1=float(input("请输入第一个数字"))
num2=float(input("请输入第二个数字"))
op =input("请输入运算符：")
if op=="+":
    print(num2+num1)
elif op=="-":
    print(num2 - num1)
elif op=="*":
    print(num2 * num1)
elif op == "/":
    print(num2 / num1)
else:
    print("输入错误")